Conditions | 2 |
Paths | 2 |
Total Lines | 26 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | $(document).ready(function () { |
||
14 | function scrollToNearReport() { |
||
15 | var scrollTo = null; |
||
16 | var current_report = null; |
||
17 | var prev_report = null; |
||
18 | var now_time = getCurrentTimeStr(); |
||
19 | |||
20 | $('.program-body__td--time').each(function (index, value) { |
||
21 | if (current_report !== null) { |
||
22 | prev_report = current_report; |
||
23 | } |
||
24 | current_report = $(this); |
||
25 | if (now_time < current_report.text()) { |
||
26 | if (prev_report !== null) { |
||
27 | scrollTo = prev_report; |
||
28 | } else { |
||
29 | scrollTo = current_report; |
||
30 | } |
||
31 | return false; |
||
32 | } |
||
33 | }); |
||
34 | if (scrollTo !== null) { |
||
35 | $('body,html').animate({ |
||
36 | scrollTop: scrollTo.offset().top - 125 |
||
37 | }, 600); |
||
38 | } |
||
39 | } |
||
40 | |||
54 | }); |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.